

package cn.shengchao.examstar.rpc.distribute.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: examstarapi
 * @description: 分销角色
 * @author: Xiong weiqiang
 * @create: 2025-03-25 10:22
 */
@Getter
@AllArgsConstructor
public enum DistributeDataValidEnum {
    STATUS_INVALID(0, "不生效"), STATUS_VALID(1, "生效"),;

    private final int status;
    private final String description;

    public static DistributeDataValidEnum getByStatus(int status) {
        for (DistributeDataValidEnum distributeDataValidEnum : DistributeDataValidEnum.values()) {
            if (distributeDataValidEnum.getStatus() == status) {
                return distributeDataValidEnum;
            }
        }
        return null;
    }
}